package com.neuedu.nep.controller;

import com.neuedu.nep.SceneManager.SceneManager;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;

import java.net.URL;
import java.util.ResourceBundle;

public class View1Controller extends BaseController{
    private Parent viewRoot;
    @FXML
    private Label label;


    @FXML
    void Click() {
        label.setText("Clicked");
    }

    @FXML
    void switchTo2(){
        System.out.println("Switching to 2");
        SceneManager.getInstance().switchScene("view2");
    }

    @Override
    protected Parent getView() {
        return viewRoot;
    }

    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        label.setText("Hello World");
    }
}
